package com.link2room.blaster.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by Administrator on 2017/3/1.
 */
@Entity
@Table(name = "msg_send_log", schema = "ark_msg_dev", catalog = "")
public class MsgSendLogEntity extends BaseEntity {
    private String msgId;
    private String channel;
    private String templateCode;
    private String errMsg;
    private String result;
    private String msg;
    private String errCode;

    @Basic
    @Column(name = "msg_id")
    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    @Basic
    @Column(name = "channel")
    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    @Basic
    @Column(name = "templateCode")
    public String getTemplateCode() {
        return templateCode;
    }

    public void setTemplateCode(String templateCode) {
        this.templateCode = templateCode;
    }

    @Basic
    @Column(name = "err_msg")
    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    @Basic
    @Column(name = "result")
    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    @Basic
    @Column(name = "msg")
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Basic
    @Column(name = "err_code")
    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MsgSendLogEntity that = (MsgSendLogEntity) o;

        if (msgId != null ? !msgId.equals(that.msgId) : that.msgId != null) return false;
        if (channel != null ? !channel.equals(that.channel) : that.channel != null) return false;
        if (templateCode != null ? !templateCode.equals(that.templateCode) : that.templateCode != null) return false;
        if (errMsg != null ? !errMsg.equals(that.errMsg) : that.errMsg != null) return false;
        if (result != null ? !result.equals(that.result) : that.result != null) return false;
        if (msg != null ? !msg.equals(that.msg) : that.msg != null) return false;
        if (errCode != null ? !errCode.equals(that.errCode) : that.errCode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result1 = msgId != null ? msgId.hashCode() : 0;
        result1 = 31 * result1 + (channel != null ? channel.hashCode() : 0);
        result1 = 31 * result1 + (templateCode != null ? templateCode.hashCode() : 0);
        result1 = 31 * result1 + (errMsg != null ? errMsg.hashCode() : 0);
        result1 = 31 * result1 + (result != null ? result.hashCode() : 0);
        result1 = 31 * result1 + (msg != null ? msg.hashCode() : 0);
        result1 = 31 * result1 + (errCode != null ? errCode.hashCode() : 0);
        return result1;
    }
}
